* Apply to: Table A3 simqi.xlsx
* Description:  Figure 3 in Roadmaps

clear

set more off


* All respondents

clear

import excel "...\1805 Roadmaps\Table A3 simqi.xlsx", sheet("Sheet1") firstrow

drop if model==.
drop if model > 2

* Create black values to facilitate bar spacing

set obs 8
replace model = 1 in 8
replace treatment = "blank1" in 8
replace estimate = 0 in 8
replace change = 0 in 8


* Create order term

gen order1 = 0
replace order1 = 1 if treatment=="control" & group=="any"
replace order1 = 2 if treatment=="allinfo"
replace order1 = 3 if treatment=="blank1"
replace order1 = 4 if treatment=="control" & group=="all"
replace order1 = 5 if treatment=="guide"
replace order1 = 6 if treatment=="party"
replace order1 = 7 if treatment=="perspat"
replace order1 = 8 if treatment=="perpty"


sort order1


* Figure 3a (First Difference Spatial Advantage)

graph bar change if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(-.30(.10).63) legend(off) ///
	 ytitle("") ///
	 yline(0, lcolor(black)) ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 text(.25 8 "{bf:.13}", size(large)) ///
	 text(.42 20.5 "{bf:.30 *}{superscript:a}", size(large)) ///
	 text(.25 44.5 "{bf:.13}", size(large)) ///
	 text(.43 57 "{bf:.31}{superscript:a}", size(large)) ///
	 text(.55 67.5 "{bf:.43 *}{superscript:a}", size(large)) ///
	 text(.43 80 "{bf:.31}{superscript:a}", size(large)) ///
	 text(.31 92.5 "{bf:.19}{superscript:a}", size(large)) ///
	 text(-.38 8 "{bf:Control}" " ") ///
	 text(-.38 19.5 "{bf:Any}" "{bf:Info}") ///
	 text(-.38 43.5 "{bf:Control}" " ") ///
	 text(-.38 56 "{bf:Voter}" "{bf:Guide}") ///
	 text(-.38 67.5 "{bf:Party}" "{bf:Cues}") ///
	 text(-.38 80 "{bf:Spatial}" "{bf:Map}") ///
	 text(-.38 92.5 "{bf:Party +}" "{bf:Map}") ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))


* Figure 3b (Predicted Probability Support Moderate)

graph bar estimate if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(0(.10).93) legend(off) ///
	 ytitle("") ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 text(.45 8 "{bf:.33}", size(large)) ///
	 text(.39 20.5 "{bf:.27}", size(large)) ///
	 text(.45 44.5 "{bf:.33}", size(large)) ///
	 text(.47 57 "{bf:.35}", size(large)) ///
	 text(.27 67.5 "{bf:.15 *#}", size(large)) ///
	 text(.45 80 "{bf:.33}", size(large)) ///
	 text(.33 92.5 "{bf:.21}", size(large)) ///
	 text(-.08 8 "{bf:Control}" " ") ///
	 text(-.08 19.5 "{bf:Any}" "{bf:Info}") ///
	 text(-.08 43.5 "{bf:Control}" " ") ///
	 text(-.08 56 "{bf:Voter}" "{bf:Guide}") ///
	 text(-.08 67.5 "{bf:Party}" "{bf:Cues}") ///
	 text(-.08 80 "{bf:Spatial}" "{bf:Map}") ///
	 text(-.08 92.5 "{bf:Party}" "{bf:+ Map}") ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))

* End
